package hu;

import java.util.*;

public class hu74 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String str = sc.nextLine() + " ";
        List<String> list = new ArrayList<>();
        int b = 0;
        for (int i = 0; i < str.length();) {
            if(str.charAt(i) == '"'){
                for (int j = i + 1; j < str.length() ; j++) {
                    if(str.charAt(j) == '"'){
                        list.add(str.substring(i + 1, j));
                        i = j + 1;
                        if(i < str.length() && str.charAt(i) == ' ')
                            b = i;
                        break;
                    }
                }
            }
            else if(str.charAt(i) == ' '){
                if(b != i)
                    list.add(str.substring(b,i));
                b = i + 1;
                i++;
            }
            else
                i++;
        }
        System.out.println(list.size());
        for (String s : list) {
            System.out.println(s);

        }
    }
}
